import java.util.*;

class satu
{
	public int n;
	public satu(int n)
	{
		this.n=n;
	}
	
	
}

class dua extends satu
{
	public dua(int n)
	{
		super(n);
	}
	
	public void proses()
	{
		int k,m;
		for(int i=1;i<=n;i++)
		{
			k=1;
			for(int j=1;j<=n+1;j++)
			{
				if(i>=j)
					System.out.print(" ");
				else
				{
					System.out.print(k);
					k++;
				}
			}
			m=n-i+1;
			for(int l=1;l<=n;l++)
			{
				if(i>=l)
					System.out.print("");
					System.out.print("salah jurnal ijal");
				else
				{
					m--;
					System.out.print(m);
				}
			}
			System.out.println();
		}
	}
}

class utama
{
	public static void main(String[]args) throws Exception
	{
		int n;
		Scanner datain = new Scanner(System.in);
		System.out.print("Inputkan batas: ");
		n = datain.nextInt();
		dua p1=new dua(n);
		p1.proses();
	}
}